<?php
/**
 * Created by PhpStorm.
 * User: dapeng
 * Date: 2018/10/17
 * Time: 上午10:45
 */

namespace app\controllers\Project_1_0;

use Core\Controller;

class addCases extends Controller
{
    function __construct()
    {
        parent::__construct();
        //判断是否登陆过
        if (!isset($_SESSION['user'])){
            $this->error("您尚未登录","index.php?action=user&func=login");
            exit();
        }
    }

    function addCase(){
        $model =  new \app\models\Project_1_0\Cases();
        $this->diplay("case/addCase");

    }

    function addition()
    {
        $model =  new \app\models\Project_1_0\addCases();
        $res = $model->adds($_POST["Name"],$_POST["dealer"],$_POST["receive_date"],$_POST["finish_date"],$_POST["except_date"],$_POST["status"]);
        $this->success("注册成功","index.php?action=cases&func=index");
    }

}